use framework "Foundation"use scripting additionstry		tell application "System Events"		set frontProcess to first process whose frontmost is true		set procName to name of frontProcess		tell frontProcess			tell front window				tell attribute "AXDocument"					set fileUrlOfFrontWindow to its value				end tell			end tell		end tell	end tell	on error	set fileUrlOfFrontWindow to missing valueend tryif fileUrlOfFrontWindow ≠ missing value and fileUrlOfFrontWindow ≠ "file:///Irrelevent" then	set posixPath to (current application's class "NSURL"'s URLWithString:fileUrlOfFrontWindow)'s |path|() as text	return posixPathelse	-- set posixPath to (current application's class "NSURL"'s URLWithString:fileUrlOfFrontWindow)'s |path|() as text	-- return posixPath	set theFile to POSIX path of (choose file)	tell application id "org.sunjw.fHashMacUI"		-- open POSIX path of (choose file)		open theFile	end tellend if